using System;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using System.ComponentModel;

namespace GoogleMaps
{
	/// <summary>
	/// The base class for all controls.
	/// </summary>
	public abstract class GControl
	{
		/// <summary>
		/// Renders the control by appending it to the stringbuilder that contains the JavaScript 
		/// for the related Google Map.
		/// </summary>
		/// <param name="js">A string builder containing the javascript that goes with the Google Map.</param>
		/// <param name="javaScriptVariableName">The namve of the JavaScript variable that is holding the map.</param>
		public abstract void Render(StringBuilder js, String javaScriptVariableName);
	
		/// <summary>
		/// Gets or sets a flag indicating that this control can be printed.
		/// </summary>
		public Boolean Printable { get; set; }

		/// <summary>
		/// Gets or sets a flag indicating that this control can be selected.
		/// </summary>
		public Boolean Selectable { get; set; }

		/// <summary>
		/// Gets or sets the position that this control should be rendered in.
		/// </summary>
		[PersistenceMode(PersistenceMode.InnerProperty)]
		public GControlPosition Position { get; set; }

		/// <summary>
		/// Gets or sets a flag indicating that the sytlsheets should be included from Google
		/// to enhance this control.
		/// </summary>
		public bool UseDefaultGoogleStyles { get; set; }
	}
}
